1. Field of the Invention
This invention relates generally to data protection, and more particularly to methods for protecting data of local storage using distributed storage mirroring techniques.
2. Description of the Related Art
Users of computers are continually placing more and more reliance on their computers to create, edit, modify and store important documents. With this reliance, however, comes the unfortunate reality that computers and storage associated with computers fail. There are several techniques for handing such errors. In terms of storage, for example, people are advised to make backup copies of important data. Although backups work to protect certain data that has not been updated since the last backup, simple backups don""t really work for users handling important data that continually changes from day-to-day, hour-to-hour, or even minute-to-minute.
For this reason, higher performance backup techniques which implement a redundant array of inexpensive disks (RAID) have become more common place for server environments and in desktop systems performing critical processing and storage. As is well known, there are several implementations of RAID (e.g., different RAID levels). In brief, RAID provides techniques for storing the same data across multiple locations, such as multiple hard disks. By storing the same data on multiple hard disks, the mean time to data loss (MTDL) and fault-tolerance also increases. In operation, a system using RAID presents the multiple hard disks that make up the array as a single logical hard disk. RAID level l, which is commonly referred to as xe2x80x9cdisk mirroring,xe2x80x9d uses at least two disks, which may be logical or physical disks, each configured to store the identical data.
FIG. 1 illustrates an example in which RAID level 1 is used to accomplish xe2x80x9cmirroring.xe2x80x9d The system 100 includes an application level 102, a file system level 1104, a driver level 106, an input/output controller level 108 (which may implement, for example, a SCSI controller), and rotating media 110. In the example, when a xe2x80x9cwritexe2x80x9d I/O command is issued, a single write I/O can be split into two separate xe2x80x9cwritexe2x80x9d I/O commands directed for storage at each of the rotating media 110a and 110b at different levels (depending on the system design), starting at the application level 102, or the file system level 104, or the driver level 106, or even at the input/output controller level 108. No matter what level the mirroring begins, the data needs to be written to the same particular locations in each of rotating media 110a and 110b. 
Once written, each rotating media logic will have to provide the appropriate acknowledgement back to the level at which the mirroring is initiated. For instance, if the mirroring was initiated at the driver level 106, the driver level 106 will require appropriate acknowledgement from each media 110 before the acknowledgement is sent up to the file system level 104 and application level 102 as a single xe2x80x9cwritexe2x80x9d acknowledge. It should be pointed out, however, that since the acknowledgement is generated independently by each rotating media""s logic after the successful write, the there are circumstances in which the acknowledgement from one media 110 is received before that of another media 110. As a result, latencies are introduced and the latency is generally as long as the slowest media 110. These latencies can be even greater in cases where more than two rotating media 110 are implemented in a RAID level 1 mirroring arrangement.
In view of the foregoing, there is a need for data protection methods that are more efficient that traditional RAID 1 mirroring implementations and provide for improved fault tolerance and redundancy.
Broadly speaking, the present invention fills the aforementioned needs by providing methods for efficiently mirroring data to a plurality of storage nodes. It should be appreciated that the present invention can be implemented in numerous ways, including as a process, an apparatus, a system, a device, a method, or a computer readable media. Several embodiments of the present invention are described below.
In one embodiment, a method for N-way mirroring of data is disclosed. The method includes selecting an initiator storage. The initiator storage is configured to have data that is to be protected. The method also includes selecting a group of storage nodes. Each storage node in the group of storage is configured to obtain an initial copy of the data of the initiator storage that is to be protected. A modification in the data that is to be protected in the initiator storage is then detected. The method then proceeds to notifying each of the storage of the group of storage regarding the modification. The notifying is configured to cause each of the storage of the group of storage to independently obtain the modification so as to maintain data consistency between the initiator storage and the group of storage.
An N-way mirroring system is disclosed. The system includes: (a) an initiator storage, the initiator storage having data that is to be protected; (b) initiator logic, the initiator logic being configured to monitor changes to the data that is to be protected and to generate notifications of the changes; (c) a group of storage, at least some of the storage of the group of storage residing at different physical locations, yet each of the group of storage having a communication nexus to the initiator storage; and (d) a group of storage logic, each storage logic being associated with each storage of the group of storage. Each storage logic is configured to receive notifications of changes from the initiator logic and in response to certain notifications, initiate a pulling of the changes made at the initiator storage. The pulling of the changes is configured to be made independently by each of the storage logic of each storage of the group of storage and without assistance of the initiator logic.
In yet another embodiment, a method for consistently mirroring a plurality of storage devices having instances of a file is disclosed. Consistency is maintained for the plurality of storage devices using a file consistency protocol. The method includes changing a first instance of the file on a first storage device. Once the first instance of the file is changed, a bit of a set of file consistency bits for a second instance of the file on a second storage device is set. Each storage logic is configured to receive notifications of changes from the initiator logic and the updated information is sent (pushed) to the plurality of mirrored devices.
In yet another embodiment, a method for consistently mirroring a plurality of storage devices having instances of a file is disclosed. Consistency is maintained for the plurality of storage devices using a file consistency protocol. The method includes changing a first instance of the file on a first storage device. Once the first instance of the file is changed, a bit of a set of file consistency bits for a second instance of the file on a second storage device is set. The second instance of the file is then updated in accordance with the file consistency protocol such that the second instance of the file contains the change made to the first instance of the file.
In a further embodiment of the present invention, a consistently mirrored storage system is disclosed. The consistently mirrored storage system comprises a plurality of storage devices located within the consistently mirrored storage system and a plurality of instances of a file stored on the plurality of the storage devices. In addition, the consistently mirrored storage system includes a file consistency protocol executing on the plurality of the instances of the file. The file consistency protocol facilitates the modification of a first instance of the file and the updating of secondary instances of the file in accordance with the file consistency protocol such that the plurality of the storage devices are consistently mirrored.
The advantages of the present invention are numerous. Most notably, the present invention allows for a greater amount of storage devices to be used in a mirroring environment and the present invention avoids the latency problems associated with conventional mirroring solutions which require synchronous communication with each storage of a mirror group. Another advantage of the embodiments described herein is that each storage instance of a group can be located virtually anywhere, so long as some communication nexus can be established. If any one of the storage of the group were to be destroyed or damaged, for example, by simple failure, in a fire, a hurricane, an earthquake, etc., the data would still be protected by any one of the other members of the group. This provides a powerful redundancy too for important mission critical data, yet without introducing latencies associated with conventional data mirroring techniques.
Stated yet another way, a benefit of the methodologies described herein is that an application does not need to be synchronous with all mirror updates, but rather only with a single copy""s execution. It is no longer always the responsibility of a RAID control logic to xe2x80x9cpushxe2x80x9d data to other mirror copy locations, but rather it may be the responsibility of the other mirror copy locations to update themselves through a read or xe2x80x9cpullxe2x80x9d operation to the latest xe2x80x98goodxe2x80x99 copy of the data. In any case, the mirroring of the information is autonomously executed with respect to the initiator of the write operation so as to reduce the apparent latency of the mirroring operation. Implicit in this methodology, too, is that file objects rather than blocks are maintained consistent with one another. This provides further efficiencies in the types and sizes of the chunks of data that are written or copied.